﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/adminMasterPage.master" AutoEventWireup="true" CodeFile="addJF.aspx.cs" Inherits="admin_addJF" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><div class="Body_Title">
    系统信息管理 》》添加修改机房信息</div>
    <table class="style1">
        <tr>
            <td width="240px">
                教室号</td>
            <td width="360px">
                <asp:TextBox ID="tbxJSH" runat="server"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                教室名</td>
            <td>
                <asp:TextBox ID="tbxJSM" runat="server"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                教室地址</td>
            <td>
                <asp:TextBox ID="tbxJSDZ" runat="server"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td width="230px">
                教室类型</td>
            <td>
                <asp:DropDownList ID="ddlJSLX" runat="server" AutoPostBack="True" 
                    DataSourceID="SqlDataSourceJSLX" DataTextField="c_Name" 
                    DataValueField="cID">
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSourceJSLX" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:LabInfoManageSystemConnectionString %>" 
                    
                    SelectCommand="SELECT cID, c_parentID, c_Name FROM classInfo WHERE (c_parentID = 2)">
                </asp:SqlDataSource>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                教室开放时间_开始时间</td>
            <td>
                <asp:TextBox ID="tbxKFSJ" runat="server"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                教室开放时间_关闭时间</td>
            <td>
                <asp:TextBox ID="tbxGBSJ" runat="server"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td >
                教室作用</td><td >
                <asp:TextBox ID="tbxJSZY" runat="server" Height="64px" TextMode="MultiLine" 
                    Width="270px"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        
        <tr>
            <td>
                操作</td>
            <td>
                <asp:Button ID="btnadd" runat="server" Text="添加" onclick="btnadd_Click" />
            </td>
            <td>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:LabInfoManageSystemConnectionString %>" 
                    InsertCommand="INSERT INTO jfInfo(j_Name, j_address, j_class, j_jsh, j_zy, j_kfsj_s, j_kfsj_e) VALUES (@Param1, @Param2, @Param3, @Param4, @Param5, @Param6, @Param7)" 
                    oninserting="SqlDataSource1_Inserting" onselecting="SqlDataSource1_Selecting" 
                    onupdating="SqlDataSource1_Updating" 
                    SelectCommand="SELECT jfID, j_Name, j_address, j_class, j_jsh, j_zy, j_kfsj_s, j_kfsj_e FROM jfInfo WHERE (jfID = @jfID)" 
                    UpdateCommand="UPDATE jfInfo SET j_Name=@Param1, j_address=@Param2, j_class=@Param3, j_jsh=@Param4, j_zy=@Param5, j_kfsj_s=@Param6, j_kfsj_e=@Param7  WHERE JFID=@Param8">
                    <InsertParameters>
                        <asp:Parameter Name="Param1" />
                        <asp:Parameter Name="Param2" />
                        <asp:Parameter Name="Param3" />
                        <asp:Parameter Name="Param4" />
                        <asp:Parameter Name="Param5" />
                        <asp:Parameter Name="Param6" />
                        <asp:Parameter Name="Param7" />
                    </InsertParameters>
                    <SelectParameters>
                        <asp:Parameter Name="jfID" Type="Int32" />
                    </SelectParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="Param1" />
                        <asp:Parameter Name="Param2" />
                        <asp:Parameter Name="Param3" />
                        <asp:Parameter Name="Param4" />
                        <asp:Parameter Name="Param5" />
                        <asp:Parameter Name="Param6" />
                        <asp:Parameter Name="Param7" />
                        <asp:Parameter Name="Param8" />
                    </UpdateParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
    </table>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" DataSourceID="SqlDataSourceSB" 
        EnableModelValidation="True">
        <Columns>
            <asp:BoundField DataField="sbID" HeaderText="sbID" SortExpression="sbID" />
            <asp:BoundField DataField="s_Name" HeaderText="s_Name" 
                SortExpression="s_Name" />
            <asp:BoundField DataField="s_zy" HeaderText="s_zy" SortExpression="s_zy" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSourceSB" runat="server" 
        ConnectionString="<%$ ConnectionStrings:LabInfoManageSystemConnectionString %>" 
        SelectCommand="SELECT * FROM [sbInfo] WHERE ([s_jfID] = @s_jfID)">
        <SelectParameters>
            <asp:QueryStringParameter Name="s_jfID" QueryStringField="jfID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>

